function [] = importAggregationFE(inputFile, outputFile, varargin)
	% Add paths
	addpath('../code/general_funcs');

	if length(varargin) >= 1
		VariableTypes = varargin{1};
	else
		VariableTypes = {'char', 'double'};
	end
	
	% Read input file
	opts = detectImportOptions(inputFile);
	if ~isempty(VariableTypes)
		opts.VariableTypes = VariableTypes;
		M = readtable(inputFile, opts);  % NumRows x 2
	else
		M = readtable(inputFile, opts);        % NumRows x 2
	end	
	if size(M,2) ~= 2; error('There should just be two columns.'); end;
	
	% Get column names
	idName = M.Properties.VariableNames{1};
	FE_Name = M.Properties.VariableNames{2};
	
	% Find unique values
	ids      = table2cell(M(:,1));
	vals    = table2cell(M(:,2));
	aggLabels = table2cell(unique(M(:,2)));
	
	% Make FE_labels + change type of vals and aggLabels if needed
	if isequal(opts.VariableTypes{2}, 'double')
		vals = cell2mat(vals); % only for numeric values
		aggLabels = cell2mat(aggLabels); % only for numeric values		
		if strcmp(FE_Name, 'dayOfWeek')
			if ~all(aggLabels == [0:6]'); error('Values should be 0:6'); end;
			FE_labels = strcat('dayOfWeek_is_', {'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'}');
		else
			FE_labels = strcat(FE_Name, '_is_', sprintfc('%d', aggLabels));
		end	
	else if isequal(opts.VariableTypes{2}, 'char')
		FE_labels = strcat(FE_Name, '_is_', aggLabels);
	end; end;
	
	disp(FE_labels);
	
	% Make FEs
	[flag,FEs] = ismember(vals, aggLabels);
	if any(~flag); error('This should not happen.'); end;
	FEs = make_integers(FEs);
	
	% Save output
	save(outputFile, 'FEs', 'FE_labels', 'ids', 'idName', 'FE_Name');
end
